<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
        <script src="jquery.js"></script>
        <script>
            $(document).ready(function () {
                $("ul>li").click(function () {
                    console.log($(this).html);
                });
                $("ul").append("<li>5</li><li>6</li>");
            })
        </script>
    </body>
</html>